/*
 * @Description: 档案类型 service
 * @Author: Rfan
 * @Date: 2022-12-05 19:14:40
 * @LastEditTime: 2022-12-06 10:33:12
 */

import ArchiveType from './entities/archiveType';
import { fetchATListByFondId } from '@/api/archivesType';
import type { Key } from 'react';

class ArchiveTypeService {
  /**
   * 获取档案类型列表
   */
  static getATList(fondId: Key) {
    return fetchATListByFondId(fondId).then((res) => {
      const { data } = res;
      return data.map((item: ArchiveType) => new ArchiveType(item));
    });
  }
}

export default ArchiveTypeService;
